<if condition="$isLeader eq 1">
    <div>
        <div class="col-sm-12 col-lg-8 leftbox" style="padding: 0;">
            <div class="panel" style="border:1px solid #ddd">
                <header class="panel-heading" style="padding:10px 15px">
                    我的奖扣事件
                    <span class=" pull-right"><a href="javascript:void(0)"><i class="fa icon-angle-double-right"></i></a></span>
                </header>
                <div class="panel-body" style="padding:0">
                    <table class="table boss_compare intetable table-hover">
                        <thead>
                        <tr><th>部门成员</th><th>奖分次数</th><th>奖励积分</th><th>扣分次数</th><th>扣除分数</th></tr>
                        </thead>
                        <tbody>
                        <volist name="inte" id="it">
                            <tr>
                                <td>{$it.memname}</td>
                                <td>{$it.pushnum}</td>
                                <td>{$it.push}</td>
                                <td>{$it.pullnum}</td>
                                <td>{$it.pull}</td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <div class="col-sm-12 col-lg-4 rightbox" style="padding: 0;padding-left:15px">
            <div class="panel">
                <div class="media newmedia" style="border:1px solid #ddd;border-radius:4px;padding:34px 40px">
                    <a href="javascript:;" class="pull-left">
                        <img alt="" src="__PUBLIC__/Intesys/AdminX/images/code1.png" style="height:55px;">
                    </a>
                    <div class="media-body">
                        <h5 class="media-heading"><a href="javascript:;" style="font-size:20px;color:#E24A47">未奖扣:{$cutundo}</a></h5>
                        <p>已奖扣 : <span style="color:#51B593">{$cutinreal}</span> 总奖扣 : <span style="color:#EB8E46">{$cutinlaw}</span></p>
                    </div>
                </div>
                <div class="media newmedia" style="border:1px solid #ddd;border-radius:4px;padding:34px 40px;">
                    <a href="javascript:;" class="pull-left" style="display:inline-block;width: 81px;text-align: right;">
                        <img alt="" src="__PUBLIC__/Intesys/AdminX/images/code2.png" style="height:55px;">
                    </a>
                    <div class="media-body">
                        <h5 class="media-heading"><a href="javascript:;" style="font-size:20px;color:#E24A47">未审批 : {$missioncount['doing']}</a></h5>
                        <p>已审批 : <span style="color:#51B593">{$missioncount['done']}</span> 总审批 : <span style="color:#EB8E46">{$missioncount['all']}</span></p>
                    </div>
                </div>
            </div>
            <div class="panel">

            </div>
        </div>
        <div class="clearfix"></div>
    </div>
</if>
<!--不是老板-->
<if condition="$isadmin neq 1">
<div>
    <div class="col-lg-6" style="padding: 0;padding-right:7px" id="chartbox">
        <div class="panel" style="border:1px solid #ddd">
            <div class="panel-heading" style="padding:10px 15px">
                我的奖分情况
            </div>
            <div class="panel-body">
                <div>
                    <canvas id="Chart"></canvas>
                </div>
                <script>
                    var ctx = document.getElementById("Chart");
                    var width=document.getElementById('chartbox').clientWidth;
                    ctx.style.height=width+'px';
                    var myDoughnutChart = new Chart(ctx, {
                        type: 'doughnut',
                        data: {
                            labels: {$eventtype},
                            datasets: [{
                                data: {$eventnum},
                                backgroundColor: ['#1ABC9C','#E87C25','#27727B',
                                    '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                                    '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0','#C1232B','#B5C334'
                                ],
                                hoverBackgroundColor: ['#1ABC9C','#E87C25','#27727B',
                                    '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                                    '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0','#C1232B','#B5C334',
                                ]
                            }]
                        },
                        options: {
                            legend :{
                                position:"right",
                            }
                        }
                    });
                </script>
            </div>
        </div>
    </div>
    <div class="col-lg-6" style="padding: 0;padding-left:7px" id="cutchartbox">
        <div class="panel" style="border:1px solid #ddd">
            <div class="panel-heading" style="padding:10px 15px">
                我的扣分情况
            </div>
            <div class="panel-body">
                <div>
                    <canvas id="cutcanvas"></canvas>
                </div>
                <script>
                    var ctx = document.getElementById("cutcanvas");
                    var width=document.getElementById('cutchartbox').clientWidth;
                    ctx.style.height=width+'px';
                    var myDoughnutChart = new Chart(ctx, {
                        type: 'doughnut',
                        data: {
                            labels: {$cuteventtype},
                            datasets: [{
                                data: {$cuteventnum},
                                backgroundColor: ['#1ABC9C','#E87C25','#27727B',
                                    '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                                    '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0','#C1232B','#B5C334'
                                ],
                                hoverBackgroundColor: ['#1ABC9C','#E87C25','#27727B',
                                    '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                                    '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0','#C1232B','#B5C334',
                                ]
                            }]
                        },
                        options: {
                            legend :{
                                position:"right",
                            }
                        }
                    });
                </script>
            </div>
        </div>
    </div>
    <div class="col-lg-12 myevent" style="padding: 0;">
        <div class="panel" style="border:1px solid #ddd">
            <header class="panel-heading" style="padding:10px 15px">
                我的积分事件
                <span class=" pull-right"><a href="{:U('Integral_log/index',array('member_id'=>$memberid))}"><i class="fa icon-angle-double-right"></i></a></span>
            </header>
            <div class="panel-body" style="padding:0">
                <table class="table boss_compare intetable table-hover">
                    <tbody>
                    <notempty name="list">
                    <volist name="list" id="t">
                        <tr>
                            <td style="text-align: left;width:50%;"><div style="overflow: hidden;height:19px;">{$t.title}</div></td>
                            <td style="color:#F27533">{$t.changenum}</td>
                            <td>{$t.type}</td>
                            <td>{$t.time|date='Y-m-d',###}</td>
                        </tr>
                    </volist>
                        <else />
                        <tr>
                            <td colspan="4">暂无积分数据</td>
                        </tr>
                        </notempty>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
</div>
<!--个人积分按规则分类-->
    <volist name="log" id="lo">
        <div class="col-lg-4 mydetail" style="padding-left: 0;">
            <div class="panel" style="border:1px solid #ddd;height:283px;">
                <header class="panel-heading" style="padding:10px 15px">
                    {$Think.lang.$key}
                    <span class=" pull-right"><a href="{:U('Integral_log/index',array('member_id'=>$memberid))}"><i class="fa icon-angle-double-right"></i></a></span>
                </header>
                <div class="panel-body" style="padding:0">
                    <table class="table boss_compare intetable table-hover">
                        <tbody>
                            <volist name="lo['son']" id="son">
                                <tr><td style="text-align:left;cursor: default" title="{$son.remark}"><?php echo mb_substr($son['remark'],0,15,'utf-8'); ?></td><td style="text-align:right;color:#F27533">{$son.changenum}</td></tr>
                            </volist>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </volist>
</if>
<!--不是老板-->
<!--老板-->
<if condition="$isadmin eq 1">
    <div>
        <div class="col-lg-6" id="canbox" style="padding-left:0">
            <div class="panel" style="border:1px solid #ddd">
                <div class="panel-heading" style="padding:10px 15px">
                    部门奖分情况
                </div>
                <div class="panel-body">
                    <div>
                        <canvas id="myChart" ></canvas>
                    </div>
                    <script>
                        var ctx = document.getElementById("myChart");
                        var width=document.getElementById('canbox').clientWidth;
                        ctx.style.height=width+'px';
                        var myDoughnutChart = new Chart(ctx, {
                            type: 'doughnut',
                            data: {
                                labels: {$posarr},
                                datasets: [
                                    {
                                        data:{$addarr},
                                        backgroundColor: ['#1ABC9C','#E87C25','#27727B',
                                            '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                                            '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0','#C1232B','#B5C334'
                                        ],
                                        hoverBackgroundColor: ['#1ABC9C','#E87C25','#27727B',
                                            '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                                            '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0','#C1232B','#B5C334',
                                        ]
                                    }]
                            },
                            options: {
                                legend :{
                                    position:"right",
                                }
                            }
                        });
                    </script>
                </div>
            </div>
        </div>
        <div class="col-lg-6" id="can" style="padding-right:0">
            <div class="panel" style="border:1px solid #ddd">
                <div class="panel-heading" style="padding:10px 15px">
                    部门扣分情况
                </div>
                <div class="panel-body">
                    <div>
                        <canvas id="cutchart" ></canvas>
                    </div>
                    <script>
                        var cut = document.getElementById("cutchart");
                        var cutwidth=document.getElementById('can').clientWidth;
                        cut.style.height=cutwidth+'px';
                        var newDoughnutChart = new Chart(cut,{
                            type: 'doughnut',
                            data: {
                                labels: {$posarr},
                                datasets: [
                                    {
                                        data:{$cutarr},
                                        backgroundColor: ['#1ABC9C','#E87C25','#27727B',
                        '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                        '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0','#C1232B','#B5C334'
                                        ],
                                        hoverBackgroundColor: ['#1ABC9C','#E87C25','#27727B',
                                            '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
                                            '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0','#C1232B','#B5C334',
                                        ]
                                    }]
                            },
                            options: {
                                legend :{
                                    position:"right",
                                }
                            }
                        });
                    </script>
                </div>
            </div>
        </div>
        <div class="col-lg-12 work" style="padding: 0;">
            <div class="panel" style="border:1px solid #ddd;">
                <header class="panel-heading" style="padding:10px 15px">
                    部门工作分对比
                    <span class=" pull-right"><a href="javascript:void(0)"><i class="fa icon-angle-double-right"></i></a></span>
                </header>
                <div class="panel-body" style="padding:0">
                    <table class="table boss_compare intetable table-hover">
                        <thead>
                        <tr>
                            <th>部门</th>
                            <th>人数</th>
                            <th>人均工作分</th>
                            <th>总工作分</th>
                        </tr>
                        </thead>
                        <tbody>
                        <volist name="total" id="t">
                            <tr>
                                <td>{$t.position}</td>
                                <td>{$t.num}</td>
                                <td>{$t.average}</td>
                                <td>{$t.total}</td>
                            </tr>
                        </volist>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="col-lg-12" style="padding-left:0;padding-right:0">
        <div class="panel" style="border:1px solid #ddd;margin-bottom:0;">
            <header class="panel-heading" style="padding:10px 15px">
                部门奖扣分对比
                <span class=" pull-right"><a href="javascript:void(0)"><i class="fa icon-angle-double-right"></i></a></span>
            </header>
            <div class="panel-body" style="padding:0">
                <table class="table boss_compare intetable table-hover">
                    <thead>
                    <tr>
                        <th>部门</th>
                        <th>已扣分/应扣分</th>
                        <th>扣分次数</th>
                        <th>已奖分/应奖分</th>
                        <th>奖分次数</th>
                    </tr>
                    </thead>
                    <tbody>
                    <volist name="myinte" id="my">
                        <tr>
                            <td>{$my.position}</td>
                            <td>{$my.cut}/{$my.cutinlaw}</td>
                            <td>{$my.cutnum}</td>
                            <td>{$my.add}/{$my.addinlaw}</td>
                            <td>{$my.addnum}</td>
                        </tr>
                    </volist>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</if>
<style>
    .boss_compare{margin-bottom:0;}
    .boss_compare thead tr th,.boss_compare tbody tr td{border:0;text-align:center;}
    @media screen and (max-width: 1400px) { /*当屏幕尺寸小于1400px时，应用下面的CSS样式*/
        .newmedia{
            padding:25px 23px !important;
        }
    }
    @media screen and (max-width: 1100px) { /*当屏幕尺寸小于1100px时，应用下面的CSS样式*/
        .myevent,.work,#can,.rightbox,#cutchartbox{
            padding-left:0!important;
        }
        .mydetail,#canbox,.leftbox,#chartbox{
            padding-right:0!important;
        }
    }
    section.panel,.wrapper::after{margin-bottom:0}
    .intetable tbody > :nth-child(2n+1){ background:#f9f9f9;}
</style>
